<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
<title><?= $sf_response->getTitle() ?></title>
<?php use_stylesheet('/sf/sf_admin/css/main') ?>
<?php use_stylesheet('excelbuton') ?>

<style type="text/css">
<!--
.style1 {
	font-size: 24px;
	font-weight: bold;
	color: #CC00CC;
}
.style2 {
	color: #0000FF;
	font-weight: bold;
}
-->
</style>

<table width="100%" border="0" class="textalignright">
  <tr>
    <td><div align="center"><span class="style1">REPORT INVENTORY IN <? echo date('F'). '  ' . date('d');?></span></div></td>
  </tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="0" class="textalignright">
  <tr>
    <td><strong>NO</strong></td>
    <? 
    $keysRow = array_keys($result);
    $keysCol = array_keys($result[$keysRow[0]]);
    foreach ($keysCol as $key) 
    {
    ?>
        <td><strong><? echo $key?></strong></td>
    <?    
    }
    ?>
  </tr>
<? 
foreach ($keysRow as $row)
{
?>
  <tr>
    <td><?echo $row?></td>
    
    <? foreach ($keysCol as $col) 
    {
    ?>    
    <td><?
    if (isset($rightAlign[$col]))
        echo '<p align="right">';
    echo $result[$row][$col];
    ?></td>
    <?    
    }
    ?>
    
  </tr>
<?
}
?>
</table>
